Xbasic

MathUtil::DecimalRound Method

Syntax

.Round as C (one as C, places as N)

Arguments

oneCharacter

The value to round.

placesNumeric

The number of decimal places to round. If unspecified, rounds to the nearest integer.

Returns

resultCharacter

Returns the value rounded to the nearest integer or specified number of decimal places.

Description

Rounds the value to the nearest integer or specified number of decimal places.

Example

? MathUtil::Decimal::Round("3.12")
= "3"

? MathUtil::Decimal::Round("3.12",1)
= "3.1"